﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FriendLinks.aspx.cs" Inherits="admin_FriendLinks" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/main.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" language="javascript">

        function funAdd()
        {
            window.location = "FriendLinksAdd.aspx";
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="listpad">
        <div class="list_search hidd">
            <asp:TextBox ID="txtKey" runat="server" CssClass="sear_text"></asp:TextBox>
            <%--<select><option>--条件一--</option>
                <option>--条件一--</option>
            </select>--%>
            <asp:Button ID="btnQuery" runat="server" Text="查询" CssClass="sear_sub" OnClick="Button1_Click" />&nbsp;
            <asp:Button ID="btnClear" runat="server" Text="清空" CssClass="sear_sub"  OnClick="btnClear_Click" />&nbsp;
            <asp:Button ID="btnAdd" runat="server" Text="新增" CssClass="sear_sub" OnClientClick="funAdd();return false;"  />
        </div>
        <div class="widgetbox">
            <h3 class="">
                <span>友情链接列表</span></h3>
            <div class="content nopadding ohidden">
                <asp:GridView ID="grdSysUserInfo" runat="server" AutoGenerateColumns="False" OnRowDataBound="grdSysUserInfo_RowDataBound"
                    OnRowCommand="grdSysUserInfo_RowCommand" EmptyDataText="对不起，没有相应的数据可以显示！" Width="100%"
                    BorderColor="#A1C7E8" BorderWidth="1px" Style="text-align: center;"
                    CssClass="sTable3">
                    <Columns>
                        <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="行号" HeaderStyle-Width="50px">
                            <ItemTemplate>
                                <asp:Label ID="lblNum" runat="server" Text=''></asp:Label>
                                <asp:HiddenField ID="hfID" runat="server" Value='<%# Bind("id") %>' />
                            </ItemTemplate>
                            <HeaderStyle Wrap="false" />
                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="网站中文标题">
                            <ItemTemplate>
                                <asp:Label ID="lblUserName" runat="server" Text='<%# Bind("title") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle Wrap="false" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="网站英文标题">
                            <ItemTemplate>
                                <asp:Label ID="lblENName" runat="server" Text='<%# Bind("entitle") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle Wrap="false" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="网站链接">
                            <ItemTemplate>
                                <asp:Label ID="lblLoginName" runat="server" Text='<%# Bind("url") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle Wrap="false" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="排序值">
                            <ItemTemplate>
                                <asp:Label ID="lblPassWord" runat="server" Text='<%# Bind("sort") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle Wrap="false" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkMod" CommandName="lkMod" Style="cursor: hand; color: blue;"
                                                            runat="server">编辑</asp:LinkButton>&nbsp; |&nbsp;
                                <asp:LinkButton ID="lnkDel" CommandName="lnkDel" Style="cursor: hand; color: blue;"
                                    runat="server">删除</asp:LinkButton>
                            </ItemTemplate>
                            <HeaderStyle Width="200px" Wrap="false"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" Width="200" Wrap="false"></ItemStyle>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="tableHeader" />
                    <RowStyle CssClass="sTable3 tbody" />
                </asp:GridView>
            </div>
            <!-- content -->
        </div>
        <div class="page">
            <webdiyer:AspNetPager ID="SysUserInfoPage" runat="server" AlwaysShow="True" CssClass="page"
                CurrentPageButtonClass="cpb" CustomInfoHTML="共%RecordCount%条记录 当前第%CurrentPageIndex%页/共%PageCount%页"
                CustomInfoSectionWidth="48%" CustomInfoTextAlign="Right" FirstPageText="首页" LastPageText="尾页"
                NextPageText="下一页" OnPageChanged="ChangePage" PageSize="10" PrevPageText="上一页"
                ShowCustomInfoSection="left" SubmitButtonText="转到" ShowNavigationToolTip="True">
            </webdiyer:AspNetPager>
        </div>
    </div>
    </div>
    </form>
</body>
</html>
